package com.itany.corejava.day14;

import java.io.*;
import java.util.Scanner;

public class MyScanner {

    private InputStream in;

    public MyScanner(InputStream in) {
        this.in = in;
    }

    public String nextLine(){
        try(BufferedReader br=new BufferedReader(
                new InputStreamReader(
                        in
                )
        )){

            return br.readLine();

        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }


    public static void main(String[] args) throws FileNotFoundException {


//        MyScanner sc=new MyScanner(System.in);

//        MyScanner sc=new MyScanner(new FileInputStream("d:/a.txt"));

        Scanner sc=new Scanner(new FileInputStream("d:/a.txt"));

        System.out.println(sc.nextLine());






    }


}
